home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 July / Macworld (1996-07).dmg / System 7.5 Update 2.0 / FileMaker Pro 3.0 CD Extras / FileMaker And Apple Events / Sample Applications / Matching Data / Match Records next >
Text File  |  1996-01-25  |  806b  |  21 lines

  1. tell application "FileMaker Pro"
  2.     activate
  3.     show every record of database "Original Database"
  4.     show every record of database "Old Database"
  5.     
  6.     set field "Match" of document "Original Database" to ""
  7.     set orgList to field "Full Name" of document "Original Database"
  8.     set oldList to field "Full Name" of document "Old Database"
  9.     set matchList to field "Match" of document "Original Database"
  10.     
  11.     repeat with i from 1 to (count of orgList)
  12.         if oldList contains item i of orgList then
  13.             set item i of matchList to "Match"
  14.         end if
  15.     end repeat
  16.     
  17.     set field "Match" of document "Original Database" to matchList
  18.     show (every record of database "Original Database" whose cell "Match" = "Match")
  19.     sort layout 2 of document "Original Database" by field "Last Name"
  20.     show layout 2 of document "Old Database"
  21. end tell